<template>
    <div class="_Login">
        <div class="msgBox">
            <div class="title">
                <div class="head">
                    <div class="img"></div>
                </div>
                <div class="msg">{{titleMsg}}</div>
            </div>
            <div class="formBox">
                <div class="phone">
                    <img src='@images/_loginPhone.png' alt=""/>
                    <input type="tel" placeholder="请输入手机号码" v-model="formData.phone"/>
                </div>
                <div class="pwd">
                    <img src="@images/_loginLock.png" alt="" />
                    <input type="password" placeholder="请输入密码" v-model="formData.password"/>
                </div>
            </div>
            <div class="submit" @click="submit"></div>
            <div class="other">
                <div class="forget" @click="forget">忘记密码</div>
                <div class="download" @click="download">app下载</div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    name: '_Login'
    ,data(){
        return{
            isLogin: false
            ,titleMsg: 'Hi~欢迎来到点点教育'
            ,formData:{
                phone: undefined
                ,password: undefined
            }
        }
    }
    ,created(){
        window.addEventListener("resize", this.handleResize);
    }
    ,methods: {
        handleResize() {
            if (document.body.clientWidth > 768) {
                this.$router.replace({ path: "/web/_Login" });
            }
        },
        submit(){
            console.log('提交信息');
            console.log(this.formData);
        },
        forget(){
            console.log('忘记密码');
        },
        download(){
            console.log('下载链接')
        }
    }
}
</script>
<style scoped>
._Login{
    width: 100%;
    height: 100vh;
    background-image:url('http://diandian.zgkpz.com/images/register/formbackgroud2.png');
}
.msgBox{
    width: 90vw;
    height: 60vh;
    margin: 19vh auto 0;
    background-image: linear-gradient(to bottom, #9ed751, #379b6e);
    border-radius: 0.5rem;
    padding-top: 0.5rem;
}
._Login .title{
    width: 90vw;
    height: 12vh;
}
._Login .head{
    width: 1.2rem;
    height: 1.2rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    background-image: linear-gradient(#c4abf4, #be7890);
    padding-top: 0.1rem;
    float: left;
}
.head .img{
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    border-radius: 50%;
    background-color: #fff;
}
.title .msg{
    line-height: 1.25rem;
    font-family: '微软雅黑';
    color: #fff;
    font-weight: 500;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.formBox{
    width: 6rem;
    height: 3rem;
    margin: 0 auto;
    background-color: #557d2b;
    border-radius: 0.3rem;
    padding-top: 0.5rem;
}
.formBox>div{
    width: 4.5rem;
    height: 0.8rem;
    background-color: #c0e372;
    margin: 0 auto 0.3rem;
    border-radius: 0.1rem;
    display: flex;
    align-items: center;
    padding-left: 0.2rem;
}
.formBox input{
    width: 3rem;
    line-height: 0.4rem;
    font-size: 0.4rem;
    margin-left: 0.3rem;
}
.formBox img{
    width: 0.5rem;
    align-items: center;
}
.msgBox .submit{
    width: 3rem;
    height: 0.8rem;
    margin: 0.5rem auto 0;
    background-image: url('../../assets/images/_loginSubmit.png');
    background-size: 100% 100%;
}
.msgBox .other{
    width:100%;
    height: 0.8rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
}
.other>div{
    height: 0.8rem;
    line-height: 0.8rem;
    font-size: 0.35rem;
    color: #fff;
    cursor: pointer;
}
</style>